package utility;

import java.io.File;
import java.io.IOException;

import android.graphics.drawable.Drawable;

public class FileUtility {

	
	public static boolean fileExists(String filePath)
	{
		boolean flag = false; 
		if (filePath!=null)
		{
		File file = new File(filePath);
		if(file.exists())      
		{
			flag = true; 
		}
		}
		return flag; 
	}
	
	public static Drawable getDrawableFromFilePath (String filePath)
	{
		 Drawable d = null; 
		
		if (filePath!=null)
		{
			try
			{
		 d = Drawable.createFromPath(filePath);
			}
		 
		 catch (Exception exc)
		 {
			 exc.printStackTrace();
		 }
		
		}
		
		return d; 
		
	}
	
	
	
}
